package org.xmap.ui.views;

import org.xmap.ui.View;
import org.xmap.ui.base.Window;
import org.xmap.ui.control.TextArea;

public class TextAreaView extends View {

    protected TextArea ta;

    public TextAreaView() {
        this(null);
    }

    public TextAreaView(View back) {
        super(back);
        this.ta = new TextArea(0, 0, this.getClientRect().width, this.getClientRect().height);
        this.ta.setScretchMode(Window.SCRETCH_ROW | Window.SCRETCH_COLUMN);
        this.addControls(this.ta);
    }

    public void addText(String msg) {
        this.ta.addText(msg);
    }

    public void resetText() {
        this.ta.delAll();
    }
}
